package HLLibClasses;

import HLCode.HLClassManager;
import HLCode.HLLibClass;
import HLCode.HLObject;
import HLLib.base.HLGraphics;
import HLLib.base.HLString;
import HLLib.game.HLSprite;
import HLLib.game.HLSpriteSeed;
import HLLib.http.HLANetFile;
import HLLib.io.HLFile;

public class HLClassSpriteSeed extends HLLibClass {
    public HLClassSpriteSeed(HLClassManager owner) {
        super(owner);
    }

    public HLObject NewObject() {
        return new HLSpriteSeed();
    }

    public void Execute(HLObject self, int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            ((HLSpriteSeed) self).LoadFromPackage((HLString)args.GetObject(0));
            break;
        }
        case 1: {
            ((HLSpriteSeed) self).LoadFromPackageAsynchronous((HLString)args.GetObject(0), (HLSprite)args.GetObject(1));
            break;
        }
        case 2: {
            ((HLSpriteSeed) self).LoadFromPackageAsynchronousEx((HLString)args.GetObject(0), args.GetBoolean(0), (HLSprite)args.GetObject(1));
            break;
        }
        case 3: {
            ((HLSpriteSeed) self).RefreshWaitSprites();
            break;
        }
        case 4: {
            ((HLSpriteSeed) self).AddWaitSprites((HLSprite)args.GetObject(0));
            break;
        }
        case 5: {
            ((HLSpriteSeed) self).LoadFromFile((HLFile)args.GetObject(0), args.GetBoolean(0), args.GetBoolean(1));
            break;
        }
        case 6: {
            ((HLSpriteSeed) self).Render((HLGraphics)args.GetObject(0), args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4));
            break;
        }
        case 7: {
            ((HLSpriteSeed) self).RenderEX((HLGraphics)args.GetObject(0), args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6), args.GetInt(7), args.GetInt(8), args.GetInt(9), args.GetInt(10), args.GetInt(11));
            break;
        }
        case 8: {
            ((HLSpriteSeed) self).StartLoad();
            break;
        }
        case 9: {
            ((HLSpriteSeed) self).LoadFileAsynchronous();
            break;
        }
        case 10: {
            ((HLSpriteSeed) self).LoadFileByAnother((HLANetFile)args.GetObject(0));
            break;
        }
        }
    }
}
